package com.dongjiantong.farmrecords.mapper;

import com.dongjiantong.farmrecords.model.FarmRecordsCowRecords;
import com.dongjiantong.mybatis.MyMapper;

import java.util.List;
import java.util.Map;

public interface FarmRecordsBullRecordsMapper extends MyMapper<FarmRecordsCowRecords> {

    /**
     * 根据单据前缀寻找最大单据号
     * @param prefix
     * @return
     */
    String findMaxNumber(String prefix);

    /**
     * 新建牛档案
     * @param farmRecordsBullRecords
     * @return
     */
    Integer createOne(FarmRecordsCowRecords farmRecordsBullRecords);

    /**
     * 养殖端分页查看牛档案
     * @param map
     * @return
     */
    List<FarmRecordsCowRecords> selectListByStatus(Map<String, Object> map);

    /**
     * 政府端分页查看牛档案
     * @param map
     * @return
     */
    List<FarmRecordsCowRecords> selectByMap(Map map);
}